home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7807 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: need for function prototypes
  5. Date: Thu, 29 Feb 96 00:16:13 GMT
  6. Organization: none
  7. Message-ID: <825552973snz@genesis.demon.co.uk>
  8. References: <4gutho$o1a@mn5.swip.net> <TANMOY.96Feb27115933@qcd.lanl.gov>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <TANMOY.96Feb27115933@qcd.lanl.gov>
  15.            tanmoy@qcd.lanl.gov "Tanmoy Bhattacharya" writes:
  16.  
  17. >In article <4gutho$o1a@mn5.swip.net>
  18. >chris.rossall@mailbox.swipnet.se (Chris Rossall) writes:
  19. >
  20. >CR: Hello I am having trouble understanding why I should use function
  21. >CR: prototypes. I mean,if the function is defined before it is used,the
  22. >CR: compiler should have enough information about the parameters to
  23. >CR: produce correct code anyway.
  24. >
  25. >Point 1:
  26. >
  27. >The calling sequence of a function with a prototype is often different
  28. >from the type it seems to be declared with. Thus in
  29.  
  30. That's backwards - a prototyped declaration states the types of the
  31. arguments passed (other than ones corresponding to ...). I assume that
  32. where you wrote 'with' you meant 'without'.
  33.  
  34. -- 
  35. -----------------------------------------
  36. Lawrence Kirby | fred@genesis.demon.co.uk
  37. Wilts, England | 70734.126@compuserve.com
  38. -----------------------------------------
  39.